//
//  JFViewController.m
//  JFiToast
//
//  Created by ranjingfu on 03/01/2016.
//  Copyright (c) 2016 ranjingfu. All rights reserved.
//

#import "JFViewController.h"
#import "iToast.h"

@interface JFViewController ()

@end

@implementation JFViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    UIButton *btnTest = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
    [btnTest setTitle:@"test" forState:UIControlStateNormal];
    [btnTest setBackgroundColor:[UIColor redColor]];
    [btnTest addTarget:self action:@selector(testItoast:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btnTest];
    
    
    UIButton *btnCloseTest = [[UIButton alloc] initWithFrame:CGRectMake(100, 200, 100, 100)];
    [btnCloseTest setTitle:@"close" forState:UIControlStateNormal];
    [btnCloseTest setBackgroundColor:[UIColor redColor]];
    [btnCloseTest addTarget:self action:@selector(close:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btnCloseTest];
	// Do any additional setup after loading the view, typically from a nib.
}


- (void)testItoast:(id)sender
{
    iToast  *toast = [[iToast alloc] initWithText:@"hello"];
    [toast show];
}

- (void)close:(id)sender
{
    
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
